#include "EditLexer.h"
#include "EditStyleX.h"

// https://www.latex-project.org/

static KEYWORDLIST Keywords_TEX = {{
nullptr
}};

static EDITSTYLE Styles_TEX[] = {
	EDITSTYLE_DEFAULT,
	{ SCE_L_COMMAND, NP2StyleX_Command, L"fore:#0000FF" },
	{ MULTI_STYLE(SCE_L_COMMENT, SCE_L_COMMENT2, 0, 0), NP2StyleX_Comment, L"fore:#608060" },
	{ SCE_L_TITLE, NP2StyleX_Title, L"fore:#008000" },
	{ SCE_L_CHAPTER, NP2StyleX_Chapter, L"fore:#008000" },
	{ MULTI_STYLE(SCE_L_SECTION, SCE_L_SECTION1, SCE_L_SECTION2, 0), NP2StyleX_Section, L"fore:#008000" },
	{ MULTI_STYLE(SCE_L_MATH, SCE_L_MATH2, 0, 0), NP2StyleX_Math, L"fore:#FF0000" },
	{ SCE_L_SPECIAL, NP2StyleX_SpecialCharacter, L"fore:#3A6EA5" },
	{ MULTI_STYLE(SCE_L_TAG, SCE_L_TAG2, 0, 0), NP2StyleX_Tag, L"fore:#FF8000" },
	{ SCE_L_CMDOPT, NP2StyleX_Option, L"fore:#1E90FF" },
	{ SCE_L_STRING, NP2StyleX_String, L"fore:#008000" },
	{ MULTI_STYLE(SCE_L_QUOTE1, SCE_L_QUOTE2, 0, 0), NP2StyleX_Quote, L"fore:#408080" },
	{ MULTI_STYLE(SCE_L_VERBATIM, SCE_L_VERBATIM2, 0, 0), NP2StyleX_VerbatimSegment, L"fore:#666666" },
	{ SCE_L_LISTCODE, NP2StyleX_ListCode, L"fore:#808080" },
	{ SCE_L_OPERATOR, NP2StyleX_Operator, L"fore:#B000B0" },
};

EDITLEXER lexLaTeX = {
	SCLEX_LATEX, NP2LEX_LATEX,
//Settings++Autogenerated -- start of section automatically generated
		LexerAttr_EscapePunctuation,
		TAB_WIDTH_4, INDENT_WIDTH_4,
		(1 << 0) | (1 << 1), // level1, level2
		0,
		'^', SCE_L_SPECIAL, 0,
		0,
		0, 0,
		SCE_L_OPERATOR, 0,
		KeywordAttr_Default
		, SCE_L_COMMENT2,
		0, 0,
//Settings--Autogenerated -- end of section automatically generated
	EDITLEXER_HOLE(L"LaTeX File", Styles_TEX),
	L"tex; latex; sty; cls; tpx; bbl; bib; ltx; dtx; ins; toc; info; rd",
	&Keywords_TEX,
	Styles_TEX
};
